<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title th:text="${session.website_title}"></title>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <script type="text/javascript" src="/static/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
    <link rel="stylesheet" type="text/css" href="/static/css/style.css">
</head>
<body>
<div class="header_box">
    <div class="header">
        <ul class="app-header">
            <li class="app-header-menuicon">
                <i class="layui-icon layui-icon-more-vertical"></i>
            </li>
        </ul>
        <h1 class="logo">
            <a href="/">冷文图床(私人版)</a>
        </h1>
        <div class="nav" style="visibility: visible">
            <a href="/" class="active">首页</a>
            <a href="https://www.bilibili.com/video/BV1BX4y1P7U4/">视频教程</a>
            <a href="https://kevinlu98.cn/?post=28">使用说明</a>
            <a href="https://www.kevinlu98.cn/">关于我</a>
            <a href="/logout">退出</a>
        </div>
        <ul class="layui-nav header-down-nav">
            <li class="layui-nav-item"><a href="/" class="active">首页</a></li>
            <li class="layui-nav-item"><a href="https://www.bilibili.com/video/BV1BX4y1P7U4/">视频教程</a></li>
            <li class="layui-nav-item"><a href="https://kevinlu98.cn/?post=28">使用说明</a></li>
            <li class="layui-nav-item"><a href="https://www.kevinlu98.cn/">关于我</a></li>
        </ul>
    </div>
</div>
<div class="content">
    <div class="prod-show" style="padding: 0;">
        <div class="layui-carousel imgbox" id="test1">
            <div carousel-item class="imgH">
                <div><img style="width: 100%"
                          src="https://gitee.com/kevinlu98/imgbed/raw/master/20210120/HQPRiZqBY1Wx.png" alt=""></div>
                <div><img style="width: 100%"
                          src="https://gitee.com/kevinlu98/imgbed/raw/master/图床素材/kCma2!Mqj4Xw.png" alt=""></div>
            </div>
        </div>
    </div>
    <div class="prod-show" style="padding: 0;margin-top: 10px;">
        <fieldset class="layui-elem-field">
            <legend style="text-align: center">功能区域</legend>
            <div class="layui-field-box">
                <div class="layui-row">
                    <div class="layui-col-xs12 layui-col-sm6 layui-col-md6" style="padding: 20px">
                        <div class="lw-image-show">
                            <img src="/static/image/upload.png" id="imgshow" alt="">
                        </div>
                    </div>
                    <div class="layui-col-xs12 layui-col-sm6 layui-col-md6" style="height: 600px">
                        <div class="layui-tab layui-tab-brief" lay-filter="imgbedtab"
                             style="margin-top: 0;padding-left: 20px;border-left: 2px solid #cccccc;height: 100%">
                            <ul class="layui-tab-title">
                                <li class="layui-this" lay-id="1">外链设置</li>
                                <li lay-id="2">图片管理</li>
                            </ul>
                            <div id="lw-path">
                                <div th:fragment="lw-path" style="padding: 10px;" th:data-prefix="${prefix}">
                                    <input id="prefix" type="hidden" th:value="${prefix}">
                                    <cite style="margin-right: 10px;">当前路径:</cite>
                                    <a data-path="">我的文件 /</a>
                                    <a th:each="path,pathStar : ${pathes}"
                                       th:data-path="${path.href}" th:text="${path.name + ' / '}"></a>
                                </div>
                            </div>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">图片URL</label>
                                        <div class="layui-input-block">
                                            <input id="img-url" type="text" disabled placeholder="图片URL"
                                                   autocomplete="off"
                                                   class="layui-input">
                                            <button data-id="img-url" type="button" class="layui-btn lw-copy">
                                                <span class="layui-icon layui-icon-list"></span>
                                            </button>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">Img标签</label>
                                        <div class="layui-input-block">
                                            <input id="img-img" type="text" disabled placeholder="Img标签"
                                                   autocomplete="off"
                                                   class="layui-input layui-btn-primary">
                                            <button data-id="img-img" type="button" class="layui-btn lw-copy">
                                                <span class="layui-icon layui-icon-list"></span>
                                            </button>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">BBCode论坛代码</label>
                                        <div class="layui-input-block">
                                            <input id="img-bbs" type="text" disabled placeholder="BBCode论坛代码"
                                                   autocomplete="off"
                                                   class="layui-input">
                                            <button data-id="img-bbs" type="button" class="layui-btn lw-copy">
                                                <span class="layui-icon layui-icon-list"></span>
                                            </button>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">Markdown代码</label>
                                        <div class="layui-input-block">
                                            <input id="img-mark" type="text" disabled placeholder="Markdown代码"
                                                   autocomplete="off"
                                                   class="layui-input">
                                            <button data-id="img-mark" type="button" class="layui-btn lw-copy">
                                                <span class="layui-icon layui-icon-list"></span>
                                            </button>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">上传图片</label>
                                        <div class="layui-input-block">
                                            <button type="button" class="layui-btn" id="lw-upload">
                                                <i class="layui-icon">&#xe67c;</i>上传图片
                                            </button>
                                        </div>
                                        <input style="display: none" type="file" name="file" class="upinput"/>
                                    </div>
                                </div>
                                <div class="layui-tab-item" style="position:relative;">
                                    <button type="button" id="lw-mkdir"
                                            class="layui-btn layui-btn-normal layui-btn-sm">
                                        新建文件夹
                                    </button>
                                    <button type="button" class="layui-btn layui-btn-sm" id="lw-upload-pos">
                                        <i class="layui-icon">&#xe67c;</i>上传图片
                                    </button>

                                    <input style="display: none" type="file" name="file" class="upinput"/>
                                    <div class="lw-file" style="margin-top: 20px;">
                                        <div id="lw-files-list">
                                            <div th:fragment="lw-files-list">
                                                <div th:each="file,fileStar: ${files}"
                                                     th:data-url="${file.getUrl()}"
                                                     th:data-type="${file.type}"
                                                     th:data-path="${file.getFileName()}"
                                                     class="layui-col-xs12 layui-col-sm4 layui-col-md3 lw-file-content">
                                                    <div th:class="${'lw-file-list layui-col-xs4 layui-col-sm12 layui-col-md12 lw-'+file.getType()}"></div>
                                                    <div class="layui-col-xs6 layui-col-sm12 layui-col-md12 lw-file-name"
                                                         style="text-align: center" th:text="${file.getName()}">
                                                    </div>
                                                    <div class="layui-col-xs2 layui-col-sm12 layui-col-md12 lw-file-name"
                                                         style="text-align: center">
                                                        <a th:data-path="${file.getFileName()}"
                                                           class="lw-rm-file">删除</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
    </div>
</div>
<div class="footer" style="color: #eeeeee;">
    <p>© 2019-2020 <a href="http://image.kevinlu98.cn/">冷文图床-冷文学习者</a></p>
    <p style="margin: 10px 0;">本图床基于腾讯COS来存储图片，成本低且使用简单，若在使用过程中遇到任何问题请联系QQ:1628048198或Email:kevinlu98@qq.com</p>
    <p style="margin: 10px 0;">若您有好的建议也请联系作者</p>
    <p><a href="http://www.kevinlu98.cn" target="_blank">陕ICP备19024566号</a> &nbsp; </p>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script src="https://cdn.bootcss.com/clipboard.js/2.0.6/clipboard.min.js"></script>
<script src="/static/js/script.js"></script>
<script>
    layui.use(['carousel', 'jquery', 'element'], function () {
        var carousel = layui.carousel, $ = layui.$;
        //建造实例
        carousel.render({
            elem: '#test1'
            , width: '100%' //设置容器宽度
            , arrow: 'always'
            , height: 'auto'
            //,anim: 'updown' //切换动画方式
        });
        $('.app-header-menuicon').on('click', function () {
            $('.header-down-nav').toggleClass('down-nav')
        })
        var imgH = $('.imgH img').css('width');
        console.log(720 / 1920);
        var imgH = parseInt(imgH) * 0.375;
        $('.imgH').css('height', imgH + 'px')
        window.onresize = function () {
            var imgH = $('.imgbox div.layui-this').outerHeight();
            $('.imgH').css('height', imgH + 'px')
        };


    });
</script>
</body>
</html>